// JavaScript Document
// Hiệu ứng menu trên
 $(function(){
			  $(document).ready(function () {  
				  
				$('#menu_container ul li').hover( 
					function () { 
						//show its submenu 
						$('ul.sub_menu', this).slideDown(700); 
			  
					},  
					function () { 
						//hide its submenu 
						$('ul.sub_menu', this).slideUp(200);          
					} 
					
				); 
			  
				}); 
		  });
		  
		  
		  
// Hiệu ứng menu trái	  
 $(function(){
			  $(document).ready(function () {  
				  
				$('#Menu_left #mainNav #nav li').hover( 
					function () { 
						//show its submenu 
						$('ul.sub_menuleft', this).show(900); 
			  
					},  
					function () { 
						//hide its submenu 
						$('ul.sub_menuleft', this).hide(200);          
					} 
					
				); 
			  
				}); 
		  });
	  
$(document).ready(function(){

    $("#Menu_left").hide();

    $(function () {
        $(window).scroll(function () {
            if ($(this).scrollTop() > 250) {
                $('#Menu_left').fadeIn(600);
            } else {
                $('#Menu_left').fadeOut(300);
            }
        });
	
    });

});
		  
		  
// Hiệu ứng sile content

$(document).ready(function()
{
	$("#showcase").awShowcase(
	{
		content_width:			450,
		content_height:		300,
		fit_to_parent:			false,
		auto:					true,
		interval:				3000,
		continuous:				true,
		loading:				true,
		tooltip_width:			200,
		tooltip_icon_width:		32,
		tooltip_icon_height:	32,
		tooltip_offsetx:		18,
		tooltip_offsety:		0,
		arrows:					false,
		buttons:				false,
		btn_numbers:			false,
		keybord_keys:			false,
		mousetrace:				false, /* Trace x and y coordinates for the mouse */
		pauseonover:			true,
		stoponclick:			false,
		transition:				'hslide', /* hslide/vslide/fade */
		transition_delay:		300,
		transition_speed:		600,
		show_caption:			'show', /* onload/onhover/show */
		thumbnails:				true,
		thumbnails_position:	'outside-last', /* outside-last/outside-first/inside-last/inside-first */
		thumbnails_direction:	'horizontal', /* vertical/horizontal */
		thumbnails_slidex:		0, /* 0 = auto / 1 = slide one thumbnail / 2 = slide two thumbnails / etc. */
		dynamic_height:			false, /* For dynamic height to work in webkit you need to set the width and height of images in the source. Usually works to only set the dimension of the first slide in the showcase. */
		speed_change:			false, /* Set to true to prevent users from swithing more then one slide at once. */
		viewline:				false /* If set to true content_width, thumbnails, transition and dynamic_height will be disabled. As for dynamic height you need to set the width and height of images in the source. */
	});
});

// Hiệu ứng Tab tin tức
$(document).ready(function() {
            $('a.tab').click(function(){
                $(this).parent().parent().parent().parent().find('.chon').removeClass('chon');
                $(this).addClass('chon');
				var obj = $(this).parent();
				$(this).parent().parent().parent().parent().find('.content').slideUp(600);
                /*$('.content').slideUp(400);*/
                var content_show = $(this).attr('alt');
                $('#'+ content_show).slideDown(600);
				return false;
            });
        });
		
		
// Hiệu ứng Back to Top
$(document).ready(function(){

    // hide #back-top first
    $("#back-top").hide();
    
    // fade in #back-top
    $(function () {
        $(window).scroll(function () {
            if ($(this).scrollTop() > 550) {
			  $('#back-top').stop(false,true).fadeIn(600);
               /* $('#back-top').fadeIn(800);*/
            } else {
			  $('#back-top').stop(false,true).fadeOut(600);
                /*$('#back-top').fadeOut(500);*/
            }
        });

        // scroll body to 0px on click
        $('#back-top a').click(function () {
            $('body,html').animate({
                scrollTop: 0
            }, 800);
            return false;
        });
    });

});














		  
		  
		  